﻿using System.Windows;
using System.Windows.Controls;
using BVClient.Managers;

namespace BVClient.UserControls
{
    /// <summary>
    /// Interaction logic for CustomerDataGrid.xaml
    /// </summary>
    public partial class CustomerDataGrid : UserControl
    {
        public CustomerDataGrid()
        {
            InitializeComponent();
        }

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            CustomerProvider customerProvider = ((System.Windows.Data.ObjectDataProvider)(this.FindResource("CustomerProvider"))).ObjectInstance
                                                    as CustomerProvider;
            if (customerProvider != null)
            {
                customerProvider.SaveData();
            }
        }

    }
}
